package com.tech.platform.cms.logger.utils;

import lombok.extern.slf4j.Slf4j;

import java.net.InetAddress;

/**
 * @author shengqiang.wu
 * @date 2020/3/24/024 17:22
 * @desc
 */
@Slf4j
public class InetUtils {

    public static String getHostIp(){
        try{
            return InetAddress.getLocalHost().getHostAddress();
        }catch (Exception ex){
            log.error("[dy cms logger] logger utils,get host ip has error:{}",ex.getMessage(),ex);
            return "-";
        }
    }
}
